/**
 * @purpose 领域对象提供者集合基础实现
 * @author daizs
 * @created Mar 4, 2010
 */
package platform.common.dao.impl;

import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;

import platform.common.dao.IDao;
import platform.common.dao.IDomainProvider;
import platform.common.dao.IDomainProviderSet;



public class BaseDomainProviderSetImpl implements IDomainProviderSet {
	/**
	 * Dao对象。
	 */
	private IDao dao;

	/**
     * @see platform.common.dao.IDomainProviderSet#getDao()
     */




	public IDao getDao() {
		return dao;
	}

	/**
     * @see platform.common.dao.IDomainProviderSet#setDao()
     */
	public void setDao(IDao dao) {
		this.dao = dao;
	}

	/**
     * @see platform.common.dao.IDomainProviderSet#getDomainProviderByName(String)
     */
	public IDomainProvider getDomainProviderByName(String name){
		//利用Spring反射机制，依据属性名称获得领域提供者
		BeanWrapper bw = new BeanWrapperImpl(this);
		IDomainProvider domainHqlProvider = (IDomainProvider) bw
				.getPropertyValue(name);
		return domainHqlProvider;
	}



}
